<?php

namespace app\admin\controller;

use app\common\model\Mzongpai as MzongpaiModel;
/**
 * 宗派控制器
 * Class Mzongpai
 * @package app\admin\controller
 */
class Mzongpai extends Base
{
    /**
     * [getZongpai  获取宗派]
     * @author [C。]
     * @return json
     */
    public function getIndex()
    {
        $model = new MzongpaiModel();
        $user = $this->user;
        try{
            $data = $model->getAllData();
        }catch(\Exception $e){
            return admin_json(-1, '获取失败'.$e->getMessage());
        }
        writelog('获取宗派列表',1,$user);
        return admin_json(1, '获取成功',$data);
    }
}